package cn.hyy;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
public class ServiceCApplication_9006 {

    public static void main(String[] args) {
        SpringApplication.run(ServiceCApplication_9006.class,args);
    }
    @Bean
    @LoadBalanced//开启负载均衡 可以使用ribbon做负载均衡调用
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
